package com.love.marriage.userCommissionBalance.service;

import com.love.marriage.userCommissionWithdrawal.entity.UserCommissionWithdrawal;

import java.math.BigDecimal;

public interface CommissionCommonService {

    /**
     * @param userId 被邀请人
     * @param referrerId 回佣人
     * @param amount
     * @description: 添加回佣信息
     * @author:      alex
     * @return:      boolean
    */

    boolean addCommission(Long userId, Long referrerId, BigDecimal amount, Long orderId, String commissionType);

    /**
     * @param userId
     * @param amount
     * @description: 用户提现
     * @author:      alex
     * @return:      boolean
    */
    UserCommissionWithdrawal withdrawalCommission(Long userId, BigDecimal amount, String partnerTradeNo) throws Exception;

    /**
     * @description: 添加二级回佣信息
     * @param userId 被邀请人
     * @param amount 回佣金额
     * @return
     */
    boolean addTwoLevelCommission(Long userId, BigDecimal amount, Long orderId, String attach);

    boolean addPartnerCommission(Long userId, BigDecimal amount, Long orderId);
}
